﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebApplication1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Action50()
        {
            return View();
        }
        public ActionResult test11()
        {
            return View();
        }
        public ActionResult Index2()
        {
            var model = Enumerable.Range(1, 1000).Select(x =>new {
                Name=$"gongjie{x}",Age=x
            });
            ViewBag.model = model;
            return View();
        }
        public ActionResult Index()
        {
            var str = new EmailTemplate.Render().RenderHtml();

            //return View();
            return Content(str);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
        
        public ActionResult Test()
        {
            return View();
        }
        public ActionResult GetData()
        {
            return Json(Enumerable.Range(1, 100).Select(p => new { Text = "gongjie" + p, Age = p }), JsonRequestBehavior.AllowGet);
        }
    }
}